package com.wpx.Mapper;

import com.wpx.Pojo.Word;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface WordMapper {

    void saveWord(Word w);

    @Select("select *from Article.word where paragraph_id=#{id} order by id;")
    List<Word> getWordById(Integer id);

    @Update("update Article.word set pinyin=#{pinyin} where id=#{id}")
    void updatePinyin(Integer id, String pinyin);
    @Update("update Article.word set is_bold=#{isBold} where id=#{id}")
    void updateBold(Integer id, Integer isBold);
}
